package jpa.entitys.promis.construction;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the PAYMENT_REQUEST_INSTALLMENT database table.
 * 
 */
@Entity
@Table(name="PAYMENT_REQUEST_INSTALLMENT")
@NamedQueries({
    @NamedQuery(name = "PaymentRequestInstallment.findAll", query = " SELECT c FROM PaymentRequestInstallment c "),
    @NamedQuery(name = "PaymentRequestInstallment.findById", query = " SELECT c FROM PaymentRequestInstallment c WHERE c.id = :Id "),
    @NamedQuery(name = "PaymentRequestInstallment.findByStaging", query = " SELECT c FROM PaymentRequestInstallment c WHERE c.syncIsstaging = :syncIsstaging"),
    @NamedQuery(name = "PaymentRequestInstallment.findByInstallmentNo", query = " SELECT c FROM PaymentRequestInstallment c WHERE c.id.company = :company And c.id.project = :project And c.id.requestType = :requestType And c.id.requestSeries = :requestSeries And c.id.requestNo = :requestNo And c.id.seq = :seq And c.installmentNo = :installmentNo")
})
public class PaymentRequestInstallment extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private PaymentRequestInstallmentPK id;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="ACTUAL_WORK_COMPLETED", precision=16, scale=2)
	private BigDecimal actualWorkCompleted;

	@Column(name="AD_PERCENT", precision=20, scale=8)
	private BigDecimal adPercent;

	@Column(name="AD_TYPE", length=2)
	private String adType;

	@Column(name="ADV_RECOVER_AMOUNT", precision=22)
	private BigDecimal advRecoverAmount;

	@Column(name="BOQ_PAYMENT_CODE", length=30)
	private String boqPaymentCode;

	@Column(name="BUILDING_PHASE", length=30)
	private String buildingPhase;

	@Column(name="CONTR_GUARANTEE_AMOUNT", precision=22)
	private BigDecimal contrGuaranteeAmount;

	@Column(name="CONTR_GUARANTEE_PERCENT", precision=22)
	private BigDecimal contrGuaranteePercent;

	@Column(name="CONTR_GUARANTEE_TYPE", length=2)
	private String contrGuaranteeType;

	@Column(name="CREATED_BY")
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(length=10)
	private String currency;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CUT_OFF_DATE")
	private Date cutOffDate;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="END_DATE")
	private Date endDate;

	@Column(name="EXCHANGE_RATE", precision=20, scale=8)
	private BigDecimal exchangeRate;

	@Column(name="GD_PERCENT", precision=20, scale=8)
	private BigDecimal gdPercent;

	@Column(name="GD_TYPE", length=2)
	private String gdType;

	@Column(name="INSTALLMENT_AMOUNT", precision=22)
	private BigDecimal installmentAmount;

	@Column(name="INSTALLMENT_DESC", length=300)
	private String installmentDesc;

	@Column(name="INSTALLMENT_NET_AMOUNT", precision=22)
	private BigDecimal installmentNetAmount;

	@Column(name="INSTALLMENT_NO", precision=22)
	private BigDecimal installmentNo;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="LINK_FILE_ID", precision=22)
	private BigDecimal linkFileId;

	@Column(name="NET_PAYMENT_AMOUNT", precision=22)
	private BigDecimal netPaymentAmount;

	@Column(name="PAYMENT_AMOUNT", precision=22)
	private BigDecimal paymentAmount;

	@Column(name="PAYMENT_REQUEST_DETAILS_ID", length=100)
	private String paymentRequestDetailsId;

	@Column(name="PAYMENT_REQUEST_HEADER_ID", length=100)
	private String paymentRequestHeaderId;

	@Column(name="PAYMENT_REQUEST_INSTALLMENT_ID", length=100)
	private String paymentRequestInstallmentId;

	@Column(name="PENALTY_AMOUNT", precision=22)
	private BigDecimal penaltyAmount;

	@Column(name="PENALTY_DAY", precision=22)
	private BigDecimal penaltyDay;

	@Column(name="REF_NO", precision=22)
	private BigDecimal refNo;

	@Column(name="REF_SEQ", precision=22)
	private BigDecimal refSeq;

	@Column(name="REF_SERIES", length=4)
	private String refSeries;

	@Column(name="REF_TYPE", length=2)
	private String refType;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="REQUEST_DATE")
	private Date requestDate;

	@Column(name="RETENTION_AMOUNT", precision=22)
	private BigDecimal retentionAmount;

	@Column(length=1)
	private String status;

	@Column(name="SUPPLIER_CODE", length=30)
	private String supplierCode;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO", length=100)
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TAX_PERCENT", precision=20, scale=8)
	private BigDecimal taxPercent;

	@Column(name="TAX_TYPE", length=2)
	private String taxType;

	@Column(name="UNIT_NUMBER", length=30)
	private String unitNumber;

	@Column(name="VAT_AMOUNT", precision=22)
	private BigDecimal vatAmount;

	@Column(name="ZONE_CODE", length=30)
	private String zoneCode;
	
	@Column(name="SYNC_ISSTAGING", length=1)
	private String syncIsstaging;
	
	@Column(name="PAYMENT_FLAG", length = 1)
	private String paymentFlag;
	
	@Column(name="PAID_AMOUNT")
	private BigDecimal paidAmount;
	
	@Column(name="IS_INTERFACE")
	private String isInterface;

	public String getIsInterface() {
		return isInterface;
	}

	public void setIsInterface(String isInterface) {
		this.isInterface = isInterface;
	}

    /**
	 * @return the paidAmount
	 */
	public BigDecimal getPaidAmount() {
		return paidAmount;
	}

	/**
	 * @param paidAmount the paidAmount to set
	 */
	public void setPaidAmount(BigDecimal paidAmount) {
		this.paidAmount = paidAmount;
	}

	/**
	 * @return the paymentFlag
	 */
	public String getPaymentFlag() {
		return paymentFlag;
	}

	/**
	 * @param paymentFlag the paymentFlag to set
	 */
	public void setPaymentFlag(String paymentFlag) {
		this.paymentFlag = paymentFlag;
	}

	/**
	 * @return the syncIsstaging
	 */
	public String getSyncIsstaging() {
		return syncIsstaging;
	}

	/**
	 * @param syncIsstaging the syncIsstaging to set
	 */
	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public PaymentRequestInstallment() {
    }

	public PaymentRequestInstallmentPK getId() {
		return this.id;
	}

	public void setId(PaymentRequestInstallmentPK id) {
		this.id = id;
	}
	
	public BigDecimal getActualWorkCompleted() {
		return this.actualWorkCompleted;
	}

	public void setActualWorkCompleted(BigDecimal actualWorkCompleted) {
		this.actualWorkCompleted = actualWorkCompleted;
	}

	public BigDecimal getAdPercent() {
		return this.adPercent;
	}

	public void setAdPercent(BigDecimal adPercent) {
		this.adPercent = adPercent;
	}

	public String getAdType() {
		return this.adType;
	}

	public void setAdType(String adType) {
		this.adType = adType;
	}

	public BigDecimal getAdvRecoverAmount() {
		return this.advRecoverAmount;
	}

	public void setAdvRecoverAmount(BigDecimal advRecoverAmount) {
		this.advRecoverAmount = advRecoverAmount;
	}

	public String getBoqPaymentCode() {
		return this.boqPaymentCode;
	}

	public void setBoqPaymentCode(String boqPaymentCode) {
		this.boqPaymentCode = boqPaymentCode;
	}

	public String getBuildingPhase() {
		return this.buildingPhase;
	}

	public void setBuildingPhase(String buildingPhase) {
		this.buildingPhase = buildingPhase;
	}

	public BigDecimal getContrGuaranteeAmount() {
		return this.contrGuaranteeAmount;
	}

	public void setContrGuaranteeAmount(BigDecimal contrGuaranteeAmount) {
		this.contrGuaranteeAmount = contrGuaranteeAmount;
	}

	public BigDecimal getContrGuaranteePercent() {
		return this.contrGuaranteePercent;
	}

	public void setContrGuaranteePercent(BigDecimal contrGuaranteePercent) {
		this.contrGuaranteePercent = contrGuaranteePercent;
	}

	public String getContrGuaranteeType() {
		return this.contrGuaranteeType;
	}

	public void setContrGuaranteeType(String contrGuaranteeType) {
		this.contrGuaranteeType = contrGuaranteeType;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public Date getCutOffDate() {
		return this.cutOffDate;
	}

	public void setCutOffDate(Date cutOffDate) {
		this.cutOffDate = cutOffDate;
	}

	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public BigDecimal getExchangeRate() {
		return this.exchangeRate;
	}

	public void setExchangeRate(BigDecimal exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public BigDecimal getGdPercent() {
		return this.gdPercent;
	}

	public void setGdPercent(BigDecimal gdPercent) {
		this.gdPercent = gdPercent;
	}

	public String getGdType() {
		return this.gdType;
	}

	public void setGdType(String gdType) {
		this.gdType = gdType;
	}

	public BigDecimal getInstallmentAmount() {
		return this.installmentAmount;
	}

	public void setInstallmentAmount(BigDecimal installmentAmount) {
		this.installmentAmount = installmentAmount;
	}

	public String getInstallmentDesc() {
		return this.installmentDesc;
	}

	public void setInstallmentDesc(String installmentDesc) {
		this.installmentDesc = installmentDesc;
	}

	public BigDecimal getInstallmentNetAmount() {
		return this.installmentNetAmount;
	}

	public void setInstallmentNetAmount(BigDecimal installmentNetAmount) {
		this.installmentNetAmount = installmentNetAmount;
	}

	public BigDecimal getInstallmentNo() {
		return this.installmentNo;
	}

	public void setInstallmentNo(BigDecimal installmentNo) {
		this.installmentNo = installmentNo;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getLinkFileId() {
		return this.linkFileId;
	}

	public void setLinkFileId(BigDecimal linkFileId) {
		this.linkFileId = linkFileId;
	}

	public BigDecimal getNetPaymentAmount() {
		return this.netPaymentAmount;
	}

	public void setNetPaymentAmount(BigDecimal netPaymentAmount) {
		this.netPaymentAmount = netPaymentAmount;
	}

	public BigDecimal getPaymentAmount() {
		return this.paymentAmount;
	}

	public void setPaymentAmount(BigDecimal paymentAmount) {
		this.paymentAmount = paymentAmount;
	}

	public String getPaymentRequestDetailsId() {
		return this.paymentRequestDetailsId;
	}

	public void setPaymentRequestDetailsId(String paymentRequestDetailsId) {
		this.paymentRequestDetailsId = paymentRequestDetailsId;
	}

	public String getPaymentRequestHeaderId() {
		return this.paymentRequestHeaderId;
	}

	public void setPaymentRequestHeaderId(String paymentRequestHeaderId) {
		this.paymentRequestHeaderId = paymentRequestHeaderId;
	}

	public String getPaymentRequestInstallmentId() {
		return this.paymentRequestInstallmentId;
	}

	public void setPaymentRequestInstallmentId(String paymentRequestInstallmentId) {
		this.paymentRequestInstallmentId = paymentRequestInstallmentId;
	}

	public BigDecimal getPenaltyAmount() {
		return this.penaltyAmount;
	}

	public void setPenaltyAmount(BigDecimal penaltyAmount) {
		this.penaltyAmount = penaltyAmount;
	}

	public BigDecimal getPenaltyDay() {
		return this.penaltyDay;
	}

	public void setPenaltyDay(BigDecimal penaltyDay) {
		this.penaltyDay = penaltyDay;
	}

	public BigDecimal getRefNo() {
		return this.refNo;
	}

	public void setRefNo(BigDecimal refNo) {
		this.refNo = refNo;
	}

	public BigDecimal getRefSeq() {
		return this.refSeq;
	}

	public void setRefSeq(BigDecimal refSeq) {
		this.refSeq = refSeq;
	}

	public String getRefSeries() {
		return this.refSeries;
	}

	public void setRefSeries(String refSeries) {
		this.refSeries = refSeries;
	}

	public String getRefType() {
		return this.refType;
	}

	public void setRefType(String refType) {
		this.refType = refType;
	}

	public Date getRequestDate() {
		return this.requestDate;
	}

	public void setRequestDate(Date requestDate) {
		this.requestDate = requestDate;
	}

	public BigDecimal getRetentionAmount() {
		return this.retentionAmount;
	}

	public void setRetentionAmount(BigDecimal retentionAmount) {
		this.retentionAmount = retentionAmount;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSupplierCode() {
		return this.supplierCode;
	}

	public void setSupplierCode(String supplierCode) {
		this.supplierCode = supplierCode;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public BigDecimal getTaxPercent() {
		return this.taxPercent;
	}

	public void setTaxPercent(BigDecimal taxPercent) {
		this.taxPercent = taxPercent;
	}

	public String getTaxType() {
		return this.taxType;
	}

	public void setTaxType(String taxType) {
		this.taxType = taxType;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public BigDecimal getVatAmount() {
		return this.vatAmount;
	}

	public void setVatAmount(BigDecimal vatAmount) {
		this.vatAmount = vatAmount;
	}

	public String getZoneCode() {
		return this.zoneCode;
	}

	public void setZoneCode(String zoneCode) {
		this.zoneCode = zoneCode;
	}

}